<template>
    <div class="big_box">
        <el-row :gutter="20">
            <el-col :span="8">
                <el-card class="mgb20" style="height:250px;">
                    <div class="user-info">
                        <el-image style="border-radius: 20px; width: 100px;height: 100px; margin: 10px;"
                                  src="/image/logo.png"></el-image>
                        <!--<img src="../assets/img/img.jpg" class="user-avator" alt />-->
                        <div class="user-info-cont">
                            <div class="user-info-name" style="display: inline-block">{{ $store.state.user.name }}</div>
                            <div style="display: inline-block;margin-left: 15px;color: #222222;font-size: 18px;">
                                {{GetRoleName($store.state.user)}}
                            </div>
                        </div>
                    </div>
                    <div class="user-info-list">
                        当前时间：<span>{{ NowTime }}</span>
                    </div>
                    <!--                    <div class="user-info-list">-->
                    <!--                        上次登录地点：-->
                    <!--                        <span>成都</span>-->
                    <!--                    </div>-->
                </el-card>
            </el-col>
            <el-col :span="16">
                <el-row :gutter="20" class="mgb20">
                    <el-col :span="8">
                        <el-card shadow="hover" :body-style="{ padding: '0px' }">
                            <div class="grid-content grid-con-1">
                                <i class="el-icon-message-solid grid-con-icon"></i>
                                <div class="grid-cont-right">
                                    <div class="grid-num">{{ MessCount }}</div>
                                    <div>系统消息</div>
                                </div>
                            </div>
                        </el-card>
                    </el-col>
                    <el-col :span="8">
                        <el-card shadow="hover" :body-style="{ padding: '0px' }">
                            <div class="grid-content grid-con-2">
                                <i class="el-icon-data-line grid-con-icon"></i>
                                <div class="grid-cont-right">
                                    <div class="grid-num">{{ ProjectFinishLis.length }}</div>
                                    <div>已完成项目</div>
                                </div>
                            </div>
                        </el-card>
                    </el-col>
                    <el-col :span="8">
                        <el-card shadow="hover" :body-style="{ padding: '0px' }">
                            <div class="grid-content grid-con-3">
                                <i class="el-icon-data-board grid-con-icon"></i>
                                <div class="grid-cont-right">
                                    <div class="grid-num">{{ ProjectOnLis.length }}</div>
                                    <div>进行中的项目</div>
                                </div>
                            </div>
                        </el-card>
                    </el-col>
                </el-row>
                <el-card shadow="hover" style="height:403px;" class="cardclass">
                    <template #header>
                        <div class="clearfix">
                            <span>进行中项目</span>
                        </div>
                    </template>
                    <el-table :data="ProjectOnLis" style="width:100%;" height="350">
                        <el-table-column align="center" show-overflow-tooltip label="项目编号" prop="ProjectNumber"></el-table-column>
                        <el-table-column align="center" show-overflow-tooltip label="项目名称">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ scope.row.ProjectName }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="负责人">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ GetUserName(scope.row.HeadUserId) }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="开始时间">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ newfmtDate(scope.row.StartDate) }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="预计结束时间">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ newfmtDate(scope.row.EndDate) }}</div>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-card>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="24">
                <el-card shadow="hover">
                    <template #header>
                        <div class="clearfix">
                            <span>已完成项目</span>
                        </div>
                    </template>
                    <el-table :data="ProjectFinishLis" height="600px" style="width:100%;">
                        <el-table-column show-overflow-tooltip label="项目编号">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ scope.row.ProjectNumber }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column show-overflow-tooltip label="项目名称">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ scope.row.ProjectName }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column label="负责人">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ GetUserName(scope.row.HeadUserId) }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column label="开始时间">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ newfmtDate(scope.row.StartDate) }}</div>
                            </template>
                        </el-table-column>
                        <el-table-column label="预计结束时间">
                            <template slot-scope="scope">
                                <div class="todo-item">{{ newfmtDate(scope.row.EndDate) }}</div>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-card>
            </el-col>
        </el-row>

        <el-row v-show="false">
            <el-col :span="24">
                <el-card shadow="hover">
                    <template #header>
                        <div class="clearfixtwo">
                            <span>公司文件</span>
                        </div>
                    </template>
                    <el-row :gutter="20">
                        <el-col :span="12">
                            <el-card>
                                <template>
                                    <div><span>规章制度</span></div>
                                </template>
                                <el-table :show-header="false" :data="System" style="width:100%;">
                                    <el-table-column align="center" show-overflow-tooltip>
                                        <template slot-scope="scope">
                                            <div class="todo-item">{{ scope.row.FileName }}</div>
                                        </template>
                                    </el-table-column>
                                    <el-table-column align="center" show-overflow-tooltip>
                                        <template slot-scope="scope">
                                            <div class="todo-item">{{ newfmtDate(scope.row.OperatDate) }}</div>
                                        </template>
                                    </el-table-column>
                                    <el-table-column align="center" show-overflow-tooltip>
                                        <template slot-scope="scope">
                                            <el-button size="mini" type="success" @click="updown_event(scope.row)">下载
                                            </el-button>
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </el-card>
                        </el-col>
                        <el-col :span="12">
                            <el-card>
                                <template>
                                    <div><span>模板文件</span></div>
                                </template>
                                <el-table :show-header="false" :data="Template" style="width:100%;">
                                    <el-table-column align="center" show-overflow-tooltip>
                                        <template slot-scope="scope">
                                            <div class="todo-item">{{ scope.row.FileName }}</div>
                                        </template>
                                    </el-table-column>
                                    <el-table-column align="center" show-overflow-tooltip>
                                        <template slot-scope="scope">
                                            <div class="todo-item">{{ newfmtDate(scope.row.OperatDate) }}</div>
                                        </template>
                                    </el-table-column>
                                    <el-table-column align="center" show-overflow-tooltip>
                                        <template slot-scope="scope">
                                            <el-button size="mini" type="success" @click="updown_event(scope.row)">下载
                                            </el-button>
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </el-card>
                        </el-col>
                    </el-row>
                </el-card>
            </el-col>
        </el-row>

        <!--        出库单-->
        <el-dialog fullscreen :visible.sync="OutboundOrderTable.show" :title="'出库单'+OutboundOrderTable.title"
                   :before-close="onClose">
            <OutboundOrderTable :all-project="AllProject" :all-customer="AllCustomer"
                                :all-department="AllDepartment" :outbound-order-detalis="OutboundOrderTable.data"
                                :audit-rule="OutboundOrderTable.auditRule"></OutboundOrderTable>
        </el-dialog>
        <!--        归还单-->
        <el-dialog fullscreen :visible.sync="ReturnOrderTable.show" :title="'归还单'+ReturnOrderTable.title"
                   :before-close="onClose">
            <ReturnOrderTable :audit-rule="ReturnOrderTable.auditRule" :return-orderdetails="ReturnOrderTable.data">
            </ReturnOrderTable>
        </el-dialog>
        <!--        入库单-->
        <el-dialog fullscreen :visible.sync="InboundOrderTable.show" :title="'入库单'+InboundOrderTable.title"
                   :before-close="onClose">
            <InboundOrderTable :audit-rule="InboundOrderTable.auditRule" :all-department="AllDepartment"
                               :all-customer="AllCustomer" :all-project="AllProject" :ids="InboundOrderTable.Ids"
                               :inbound-order-detalis="InboundOrderTable.data"></InboundOrderTable>
        </el-dialog>
        <!--        采购单-->
        <el-dialog fullscreen :visible.sync="PurchaseTable.show" :title="'采购单'+PurchaseTable.title"
                   :before-close="onClose">
            <PurchaseTable :audit-rule="PurchaseTable.auditRule" :all-project="AllProject"
                           :all-customer="AllCustomer" :Purchase="PurchaseTable.data"
                           :all-department="AllDepartment"></PurchaseTable>
        </el-dialog>
        <!--        申购单-->
        <el-dialog fullscreen :visible.sync="ApplyPurchaseTable.show" :title="'申购单'+ApplyPurchaseTable.title"
                   :before-close="onClose">
            <ApplyPurchaseTable :audit-rule="ApplyPurchaseTable.auditRule" :all-project="AllProject"
                                :all-department="AllDepartment"
                                :Applypurchase="ApplyPurchaseTable.data"></ApplyPurchaseTable>
        </el-dialog>
        <!--        开票单-->
        <el-dialog fullscreen :visible.sync="FinanceInvoiceTable.show" :title="'开票单'+FinanceInvoiceTable.title"
                   :before-close="onClose">
            <FinanceInvoiceOrder :all-department="AllDepartment" :all-customer="AllCustomer"
                                 :all-project="AllProject" :OrderTableAllDB="FinanceInvoiceTable.data"
                                 :id-n-umber="FinanceInvoiceTable.IdNUmber"
            ></FinanceInvoiceOrder>
        </el-dialog>
        <!--        报销单-->
        <el-dialog fullscreen :visible.sync="FinanceReimbursementTable.show"
                   :title="'报销单'+FinanceReimbursementTable.title" :before-close="onClose">
            <FinanceReimbursementOrder :Orderdata="FinanceReimbursementTable.data" :all-users="$store.state.AllUsers"
                                       :all-project="AllProject" :all-customer="AllCustomer"
                                       :all-department="AllDepartment"
                                       :all-category="AllCategory" :TableTypeNumber="1">
            </FinanceReimbursementOrder>
        </el-dialog>
        <!--        借款单-->
        <el-dialog fullscreen :visible.sync="FinanceLoanOrderTable.show" :title="'借款单'+FinanceLoanOrderTable.title"
                   :before-close="onClose">
            <FinanceLoanOrder :all-category="AllCategory" :all-department="AllDepartment" :all-project="AllProject"
                              :all-users="$store.state.AllUsers" :AllCustomer="AllCustomer"
                              :data-d-b="FinanceLoanOrderTable.data"
                              :table-type-number="FinanceLoanOrderTable.TableTypeNumber"></FinanceLoanOrder>
        </el-dialog>
        <!--        公章申请单-->
        <el-dialog :visible.sync="OfficialSealDataDetailsTable.show" width="100%" :fullscreen="true"
                   :title="'公章申请审批单---'+OfficialSealDataDetailsTable.title" :before-close="onClose">
            <OfficialSealDataTable :audit-rule="OfficialSealDataDetailsTable.auditRule"
                                   :OfficialSealData="OfficialSealDataDetailsTable.data"
                                   :ApplicantDatas="ApplicantDatas"></OfficialSealDataTable>
        </el-dialog>

    </div>
</template>

<script>
    import * as publicjs from '../../../public/Scriput/Public'
    import OutboundOrderTable from "../Material/OutboundOrder/OutboundOrderTable";
    import ReturnOrderTable from "../Material/ReturnOrder/ReturnOrderTable";
    import InboundOrderTable from "../Material/InboundOrder/InboundOrderTable";
    import PurchaseTable from "../Purchase/Purchase/PurchaseTable";
    import ApplyPurchaseTable from "../Purchase/ApplyPurchase/ApplyPurchaseTable";
    import FinanceInvoiceOrder from "../Financemanagement/FinanceInvoice/FinanceInvoiceOrder";
    import FinanceReimbursementOrder from "../Report/FinanceReimbursementOrder";
    import FinanceLoanOrder from "../Report/FinanceLoanOrder";
    import OfficialSealDataTable from "../OfficialSeal/OfficialSealData/OfficialSealDataTable"

    export default {
        name: "Index",
        components: {
            OutboundOrderTable, ReturnOrderTable,
            InboundOrderTable, PurchaseTable,
            ApplyPurchaseTable, FinanceInvoiceOrder,
            FinanceReimbursementOrder, FinanceLoanOrder,
            OfficialSealDataTable
        },
        data() {
            return {
                name: 'admin',
                //已完成的项目
                ProjectFinishLis: [],
                //进行中的项目
                ProjectOnLis: [],
                // 规章制度
                System: [],
                // 模板文件
                Template: [],
                //所有职务
                AllDutyMains: [],
                //当前时间
                NowTime: '',
                //数据清单
                detailedList: [],
                //系统消息
                MessCount: '',
                //所有项目
                AllProject: [],
                //所有部门
                AllDepartment: [],
                //所有客户
                AllCustomer: [],
                AllCategory: [],

                OutboundOrderTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    data: {},
                },
                ReturnOrderTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    data: {},
                },
                InboundOrderTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    Ids: [],
                    data: {},
                },
                PurchaseTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    data: {},
                },
                ApplyPurchaseTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    data: {},
                },
                FinanceInvoiceTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    data: {},
                    IdNUmber: 0,
                },
                FinanceReimbursementTable: {
                    show: false,
                    title: '',
                    auditRule: {},
                    data: {},
                },
                FinanceLoanOrderTable: {
                    show: false,
                    title: '',
                    data: {},
                    TableTypeNumber: 2,
                },
                OfficialSealDataDetailsTable: {
                    show: false,
                    title: '',
                    data: {},
                    auditRule: {}
                },
                ApplicantDatas: []
            };
        },
        beforeCreate() {
            // clearInterval(this.NowTimefunction)
        },
        created() {
            this.Init()
            publicjs.http(this.$http, this.$message)
            // 拿取所有公章数据
            this.ApplicantDatas = publicjs.GetAllOfficialSeal(this.$http)
            this.currentTime()
        },
        methods: {
            currentTime() {
                setInterval(this.NowTimefunction, 1000);
            },
            //当前时间
            NowTimefunction() {
                //获取年月日
                let time = new Date();
                let year = time.getFullYear();
                let month = time.getMonth() + 1;
                let day = time.getDate();
                //获取时分秒
                let h = time.getHours();
                let m = time.getMinutes();
                let s = time.getSeconds();
                //检查是否小于10
                h = this.check(h);
                m = this.check(m);
                s = this.check(s);
                this.NowTime = year + "年" + month + "月" + day + "日  " + h + ":" + m + ":" + s;
            },
            //初始数据加载
            Init() {
                this.AllDutyMains = publicjs.GetAllDutyMains(this.$http);
                //this.AllPostion = publicjs.GetAllRole(this.$http)
                this.AllProject = publicjs.GetAllProject(this.$http)
                this.AllDepartment = publicjs.GetAllDepartment(this.$http)
                this.AllCustomer = publicjs.GetAllCustomer(this.$http)
                this.AllCategory = publicjs.GetAllFinanceCategory(this.$http)


                this.$http.post('Project1/GetProjectOn').then(res => {
                    this.ProjectOnLis = res.data
                })
                this.$http.post('Project1/GetProjectFinish').then(res => {
                    this.ProjectFinishLis = res.data
                })
            },
            //获取对应人员名字
            GetUserName(value) {
                let name = ''
                if (value != 0) {
                    for (let i = 0; i < this.$store.state.AllUsers.length; i++) {
                        if (this.$store.state.AllUsers[i].Id == value) {
                            name = this.$store.state.AllUsers[i].UserName
                            return name
                        }
                    }
                }
            },
            // 获取对应公章名字
            GetApplicantName(value) {
                for (let i = 0; i < this.ApplicantDatas.length; i++) {
                    if (this.ApplicantDatas[i].Id === value) {
                        return this.ApplicantDatas[i].Name;
                    }
                }
            },
            //获取职务名称
            GetRoleName(value) {
                let name = ''
                for (let i = 0; i < this.AllDutyMains.length; i++) {
                    if (this.AllDutyMains[i].Id == value.dutyid) {
                        name = this.AllDutyMains[i].DutyName
                        return name
                    }
                }
            },
            //时间转化
            newfmtDate(value) {
				if(value=='' && value !=undefined){
					return ''
				}else{
					let fmt = value.split(' ')
					return fmt[0]					
				}
            },
            // 文件下载
            updown_event(obj) {
                let option = {id: obj.Id, FileType: obj.FileType, Type: 0, FileName: obj.FileName}
                publicjs.DownLoadFile(option)
            },
            check(i) {
                var num;
                i < 10 ? num = "0" + i : num = i;
                return num;
            },
            //审批数据筛选
            Data_screen(data) {
                if (data.LoanCount.length > 0) {
                    data.LoanCount.forEach(x => {
                        let name = {name: '借款单' + x.LoanNumber, data: x, type: "FinanceLoan"}
                        this.detailedList.push(name)
                    })
                }
                if (data.ReimCount.length > 0) {
                    data.ReimCount.forEach(x => {
                        let name = {name: '报销单' + x.ReimNumber, data: x, type: "FinanceReimbursement"}
                        this.detailedList.push(name)
                    })
                }
                if (data.InvoiceCount.length > 0) {
                    data.InvoiceCount.forEach(x => {
                        let name = {name: '开票单' + x.BillNumber, data: x, type: "FinanceInvoice"}
                        this.detailedList.push(name)
                    })
                }
                if (data.ApplyPurchaseCount.length > 0) {
                    data.ApplyPurchaseCount.forEach(x => {
                        let name = {name: '申购单' + x.ApplyPurchaseNumber, data: x, type: "ApplyPurchase"}
                        this.detailedList.push(name)
                    })
                }
                if (data.PurchaseCount.length > 0) {
                    data.PurchaseCount.forEach(x => {
                        let name = {name: '采购单' + x.PurchaseNumber, data: x, type: "Purchase"}
                        this.detailedList.push(name)
                    })
                }
                if (data.InboundCount.length > 0) {
                    data.InboundCount.forEach(x => {
                        let name = {name: '入库单' + x.InboundNumber, data: x, type: "InboundOrder"}
                        this.detailedList.push(name)
                    })
                }
                if (data.OutboundCount.length > 0) {
                    data.OutboundCount.forEach(x => {
                        let name = {name: '出库单' + x.OutboundNumber, data: x, type: "OutboundOrder"}
                        this.detailedList.push(name)
                    })
                }
                if (data.ReturnCount.length > 0) {
                    data.ReturnCount.forEach(x => {
                        let name = {name: '归还单' + x.ReturnOrderNumber, data: x, type: "ReturnOrder"}
                        this.detailedList.push(name)
                    })
                }
                if (data.OfficialSealCount.length > 0) {
                    data.OfficialSealCount.forEach(x => {
                        let name = {
                            name: '公章申请单：' + (this.GetApplicantName(x.OfficialsealId) +
                                "，" + this.GetUserName(x.ApplicantId)), data: x, type: "OfficialSealOrder"
                        }
                        this.detailedList.push(name)
                    })
                }
            },
            asdasdas(val) {
                window.parent.postMessage(val, '*')
            },
            //行点击
            rowclickEvent(obj) {
                let _this = this
                switch (obj.type) {
                    case "OutboundOrder":
                        _this.OutboundOrderTable_show_event(obj.data)
                        break;
                    case "ReturnOrder":
                        _this.ReturnOrderTable_show_event(obj.data)
                        break;
                    case "InboundOrder":
                        _this.InboundOrderTable_show_event(obj.data)
                        break;
                    case "Purchase":
                        _this.PurchaseOrder_show_event(obj.data)
                        break;
                    case "ApplyPurchase":
                        _this.applyPurchaseOrder_show_event(obj.data)
                        break;
                    case "FinanceInvoice":
                        _this.FinanceInvoice_show_event(obj.data)
                        break;
                    case "FinanceReimbursement":
                        _this.FinanceReimbursement_show_event(obj.data)
                        break;
                    case "FinanceLoan":
                        _this.FinanceLoanOrder_show_event(obj.data)
                        break;
                    case "OfficialSealOrder":
                        _this.OfficialSealOrder_show_event(obj.data)
                        break
                }
            },

            //出库单审批表格数据绑定
            OutboundOrderTable_show_event(obj) {
                this.$http.get('Report/OutboundOrder?OutboundNumber=' + obj.OutboundNumber).then(res => {
                    if (res.data.obj != null) {
                        this.OutboundOrderTable.data = res.data.obj
                        this.OutboundOrderTable.auditRule = res.data.auditRule
                        this.OutboundOrderTable.show = true
                        this.OutboundOrderTable.title = obj.OutboundNumber
                        this.onReportMianShow();
                    }
                })
            },
            //归还单弹框
            ReturnOrderTable_show_event(obj) {
                this.$http.get('Report/ReturnOrder?ReturnOrderNumber=' + obj.ReturnOrderNumber).then(res => {
                    if (res.data.obj != null) {
                        this.ReturnOrderTable.data = res.data.obj
                        this.ReturnOrderTable.auditRule = res.data.auditRule
                        this.ReturnOrderTable.show = true
                        this.ReturnOrderTable.title = obj.ReturnOrderNumber
                        this.onReportMianShow();
                    }
                })
            },
            //入库单审批表格数据绑定
            InboundOrderTable_show_event(obj) {
                this.$http.get('Report/InboundOrder?InboundNumber=' + obj.InboundNumber).then(res => {
                    if (res.data.obj != null) {
                        this.InboundOrderTable.Ids = []
                        res.data.obj.inboundRecord.forEach(item => {
                            this.InboundOrderTable.Ids.push(item.Id)
                            this.InboundOrderTable.data = res.data.obj
                            this.InboundOrderTable.auditRule = res.data.auditRule
                        })
                    }
                })
                this.InboundOrderTable.show = true
                this.InboundOrderTable.title = obj.InboundNumber
                this.onReportMianShow();
            },
            //采购单审批弹框
            PurchaseOrder_show_event(obj) {
                this.$http.get('Report/PurchaseOrder?PurchaseNumber=' + obj.PurchaseNumber).then(res => {
                    if (res.data.obj != null) {
                        this.PurchaseTable.auditRule = res.data.auditRule
                        this.PurchaseTable.data = res.data.obj
                        this.PurchaseTable.show = true
                        this.PurchaseTable.title = obj.PurchaseNumber
                        this.onReportMianShow();
                    }
                })
            },
            //申购单审批
            applyPurchaseOrder_show_event(obj) {
                this.$http.get('Report/ApplyPurchaseOrder?ApplyPurchaseNumber=' + obj.ApplyPurchaseNumber).then(res => {
                    if (res.data.obj != null) {
                        this.ApplyPurchaseTable.auditRule = res.data.auditRule
                        this.ApplyPurchaseTable.data = res.data.obj
                        this.ApplyPurchaseTable.show = true
                        this.ApplyPurchaseTable.title = obj.ApplyPurchaseNumber
                        this.onReportMianShow();
                    }
                })
            },
            //开票单审批
            FinanceInvoice_show_event(obj) {
                this.FinanceInvoiceTable.IdNUmber = obj.Id;
                this.$http.get('/Finance/FinanceInvoiceOrder?Id=' + obj.Id).then((result) => {
                    if (result.data.mes.IsSuccess) {
                        this.FinanceInvoiceTable.data = result.data;
                        this.FinanceInvoiceTable.title = obj.BillNumber;
                        this.FinanceInvoiceTable.show = true;
                        this.onReportMianShow();
                    }
                });
            },
            //报销单审批
            FinanceReimbursement_show_event(obj) {
                this.$http.get("/Finance/FinanceReimbursementOrderBit?ReimNumber=" + obj.ReimNumber).then(res => {
                    if (res.data.IsSuccess) {
                        this.FinanceReimbursementTable.data = obj;
                        this.FinanceReimbursementTable.show = true;
                        this.FinanceReimbursementTable.title = obj.ReimNumber;
                        this.onReportMianShow();
                    }
                });
            },
            //借款单
            FinanceLoanOrder_show_event(obj) {
                let ObjJsonparse = JSON.parse(JSON.stringify(obj))
                this.$http.get("/Finance/FinanceLoanOrderbit?FinanceLoanNumber=" + obj.LoanNumber).then((list) => {
                    var result = list.data;
                    if (result.mes.IsSuccess) {
                        this.FinanceLoanOrderTable.data = ObjJsonparse;
                        this.FinanceLoanOrderTable.show = true;
                        this.FinanceLoanOrderTable.title = obj.LoanNumber;
                        this.onReportMianShow();
                    }
                });
            },
            //公章申请单
            OfficialSealOrder_show_event(obj) {
                this.$http.get("OfficialSeal/OfficialSealRecordOne?Id=" + obj.Id).then((res) => {
                    if (res.data.obj != null) {
                        this.OfficialSealDataDetailsTable.auditRule = res.data.auditRule
                        this.OfficialSealDataDetailsTable.data = res.data.obj
                        this.OfficialSealDataDetailsTable.show = true
                        this.OfficialSealDataDetailsTable.title = this.GetApplicantName(obj.OfficialsealId) +
                            "，" + this.GetUserName(obj.ApplicantId)
                        this.onReportMianShow();
                    }
                });
            },
            async onReportMianShow() {
                let reportMianShow = window.parent.document.getElementsByClassName("reportMianShow");
                for (let i = 0; i < reportMianShow.length; i++) {
                    reportMianShow[i].style.display = "none";
                }
            },
            async onClose(done) {
                await done();
                let reportMianShow = window.parent.document.getElementsByClassName("reportMianShow");
                for (let i = 0; i < reportMianShow.length; i++) {
                    reportMianShow[i].style.display = "inline-block";
                }
            },
        },
    }
</script>

<style scoped>
    .el-row {
        margin-bottom: 20px;
    }

    .grid-content {
        display: flex;
        align-items: center;
        height: 100px;
    }

    .grid-cont-right {
        flex: 1;
        text-align: center;
        font-size: 14px;
        color: #999;
    }

    .grid-num {
        font-size: 30px;
        font-weight: bold;
    }

    .grid-con-icon {
        font-size: 50px;
        width: 100px;
        height: 100px;
        text-align: center;
        line-height: 100px;
        color: #fff;
    }

    .grid-con-1 .grid-con-icon {
        background: rgb(45, 140, 240);
    }

    .grid-con-1 .grid-num {
        color: rgb(45, 140, 240);
    }

    .grid-con-2 .grid-con-icon {
        background: rgb(100, 213, 114);
    }

    .grid-con-2 .grid-num {
        color: rgb(45, 140, 240);
    }

    .grid-con-3 .grid-con-icon {
        background: rgb(242, 94, 67);
    }

    .grid-con-3 .grid-num {
        color: rgb(242, 94, 67);
    }

    .user-info {
        display: flex;
        align-items: center;
        padding-bottom: 20px;
        border-bottom: 2px solid #ccc;
        margin-bottom: 20px;
    }

    .user-avator {
        width: 120px;
        height: 120px;
        border-radius: 50%;
    }

    .user-info-cont {
        padding-left: 50px;
        flex: 1;
        font-size: 14px;
        color: #999;
    }

    .user-info-cont div:first-child {
        font-size: 30px;
        color: #222;
    }

    .user-info-list {
        font-size: 14px;
        color: #999;
        line-height: 25px;
    }

    .mgb20 {
        margin-bottom: 20px;
    }

    .todo-item {
        font-size: 14px;
    }

    .todo-item-del {
        text-decoration: line-through;
        color: #999;
    }

    .schart {
        width: 100%;
        height: 300px;
    }

    .clearfixtwo {
        margin-bottom: 15px;
    }
</style>
